import React from 'react'
const Son = (props) => {
    let data = props.data;
    let text = [];
    if (data.text) {
        text = data.text
    } else {
        text = []
    }

    console.log(props.data.text)
    return (
        <div>
            <p>
                {data.name}
            </p>
            <p>
                {
                    data.touxian
                }
            </p>
            <p>
                {
                    data.home
                }
            </p>
            {
                text.map((item, index) => {
                    return <div key={index}>
                        <p>
                            {item}
                        </p>
                    </div>
                })
            }
        </div>
    )
}
export default Son